package ex.my_map;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.function.BiFunction;

/**
 * @author small瑞
 */
public class MyTry02 {
    public static void main(String[] args) throws IOException {
        Map<String , Double> map = new HashMap<>();
        map.put("ada",55.0);
        map.put("bvfbfada",55452.0);
        map.put("qweada",5215.0);
        map.put("aasdasdda",5345.0);
        map.put("adaads",45355.0);
        map.put("adasfdcxvx",43255.0);
        map.put("adavdf",423255.0);
        map.put("adacv",57745.0);
        Properties hero = new Properties();
        String path = "D:\\java\\run\\Javapross\\src\\ex\\my_map\\01.properties";
        hero.load(new FileInputStream(path));
        System.out.println(hero.get(3));
        System.out.println(hero);
        //hero.forEach((x,y)->System.out.println(x+":"+y));
        Collection<String> set = new HashSet<>();
        set.add("7890pouy") ;
        set.add("4") ;
        set.add("123") ;
        set.add("456") ;
        set.add("789") ;
        Collection<String> collection2 = new LinkedBlockingDeque<>();
        collection2.add("456") ;
        collection2.add("789") ;
        collection2.add("7890") ;
        for (String index : set) {
            index.toCharArray();
            System.out.println(Arrays.toString(index.toCharArray()));
        }
        set.forEach(x->System.out.println(Arrays.toString(x.toCharArray())));
        System.out.println(Arrays.toString(set.toArray(String[]::new)));
        Set<Integer> set1 = new HashSet<>();
        boolean add1 = set1.add(584);
        boolean add2 = set1.add(584);
        System.out.println(add1+" "+add2);
    }
}
